import request from '@/config/axios'

// 查询用户分页
export const getUserPage = async (params: any) => {
  return await request.get({ url: '/system/examUser/queryUserPage', params })
}

export const getUserQuery = async () => {
  return await request.get({ url: '/system/examUser/getExamUsers' })
}

// 下载导入模板（无权限）
export const importUserTemplate = () => {
  return request.download({ url: '/system/examUser/download' })
}

// 获取导入地址（用于 el-upload :action）
export const getImportUrl = () => {
  return import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/system/examUser/import'
}

// 修改用户
export const updateUser = (data: any) => {
  return request.post({ url: '/system/examUser/update', data })
}

// 删除用户
export const deleteUser = (id: number) => {
  return request.post({ url: '/system/examUser/delete?userId=' + id })
}




